﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Effect1 : ParticleEffectBase {

    public ParticleSystem _partycleSystem;
    float _startRadius;
    ParticleSystem.ShapeModule shapeModule;

    protected override void Init()
    {
        base.Init();
        shapeModule = _partycleSystem.shape;
        _startRadius = shapeModule.radius;
    }

    protected override void Update()
    {
        base.Update();

        float ampMultiplier = MainController.Instance._musicCore.ampMultiplier;

        ParticleSystem.MainModule main = _partycleSystem.main;
        main.gravityModifierMultiplier = _gravityRadio * ampMultiplier * _gravityMultper;
        main.startColor = _particleGraientColor.Evaluate(ampMultiplier / 1.2f);
        shapeModule.radius = _startRadius * (1 + ampMultiplier * _scaleRadio);
    }
}
